package com.group2.operations.controller;

import com.group2.operations.common.api.ApiResult;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class BaseController {
    @GetMapping("/logout")
    public ApiResult logout() {
       Subject subject = SecurityUtils.getSubject();
       subject.logout();
       return ApiResult.success("成功登出");
    }
}
